<template>
	<view class="qr">
		<u-popup :round="10" :safeAreaInsetBottom="false" :show="show" mode="center" @close="close">
			<view class="container">
				<image class="image" :class="{'icon-qrcode':!(QRUrl)}" :src="QRUrl" mode="widthFix"
					:show-menu-by-longpress="true"></image>
				<view class="title">IOS用户请长按识别二维码咨询客服支付</view>
				<view class="loginoutBtn">
					<view class="btn cancel" @click="close">取消</view>
					<view class="btn confirm" @click="confirm">我已支付</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name: "rf-qrAlert",
		props: {
			show: {
				type: Boolean,
				required: true,
				default: false,
			},
			type: {
				type: [String, Number],
				required: true,
				default: 0,
			},
			QRUrl: {
				type: String,
				required: true,
				default: ""
			},
		},
		data() {
			return {

			};
		},
		methods: {
			confirm() {
				this.$emit('confirm')
				this.$emit('close')
			},
			close() {
				this.$emit('close')
			},
		}
	}
</script>

<style lang="scss">
	.qr {

		.container {
			width: 480rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding: 80rpx;
			padding-bottom: 52rpx;

			.image {
				width: 320rpx;
				height: 320rpx;
			}

			.title {
				margin-top: 28rpx;
				font-size: 28rpx;
				font-weight: 400;
				color: #3A3D4B;
				line-height: 40rpx;
			}

			.loginoutBtn {
				display: flex;
				margin-bottom: 48rpx;

				.btn {

					margin-top: 28rpx;
					width: 200rpx;
					height: 72rpx;
					background: #F2F3F7;
					border-radius: 44rpx;
					line-height: 72rpx;
					text-align: center;

					font-size: 28rpx;
					font-weight: 400;
					color: #3A3D4B;
				}

				.cancel {
					background-color: #F2F3F7;
				}

				.confirm {
					background-color: #58C866;
				}
			}



		}
	}
</style>